Deploy multiple django instances on one Host [migrated]
Posted
by
tvn
on Super User
See other posts from Super User
or by tvn
Published on 2012-11-11T19:16:08Z
Indexed on
2012/11/12
17:05 UTC
Read the original article
Hit count: 167
I am trying to setup multiple Django instances on one Host with lighttpd. My problem is to get Djangos FCGI working on subdirectories served by my Webserver.
So my aim is the following:
www.myhost.org/django0 -> django1.fcgi on localhost:3000
www.myhost.org/django1 -> django2.fcgi on localhost:3001
www.myhost.org/django2 -> django3.fcgi on localhost:3002
Unfortunately the following configuration doesn't even work for one:
$HTTP["url"] =~ "^/django0/static($|/)" {
server.document-root = "/home/django0/django/static/"
}
$HTTP["url"] =~ "^/django0/media($|/)" {
server.document-root = "/usr/lib/python2.7/dist-packages/django/contrib/admin/media/"
}
$HTTP["url"] =~ "^/django0($|/)" {
proxy.server = ( "" => ( (
"host" => "127.0.0.1",
"port" => "3001",
"check-local" => "disable",
) )
)
}
The only response I get is an 404 and even this takes a long time till I get this. I found nothing suspicious neither in the access.log nor in the error.log.
© Super User or respective owner